 import "package:get/get.dart";
 import '/pages/tabs.dart';

 
 import '/pages/chat/msg.dart';
 import '/pages/chat/add.dart';
 
//  import '/pages/chat/book.dart';


 import '/pages/users/rate.dart';
 import '/pages/users/certification.dart';
 import '/pages/users/setting.dart';
 import '/pages/users/follow.dart';
 import '/pages/users/change_password.dart';
 import '/pages/users/help.dart';
 import '/pages/users/solution.dart';
 import '/pages/users/invitation.dart';
 import '/pages/users/poster.dart';
 import '/pages/users/osg_authentication.dart';
 import '/pages/users/identification.dart';
 import '/pages/users/examine.dart';
 import '/pages/users/live_seeting.dart';
 import '/pages/users/enterprise_certification.dart';

 import '/pages/users/user/index.dart';
 import '/pages/users/user/edit_info.dart';
 import '/pages/users/user/add_module.dart';
 import '/pages/users/user/all_collection.dart';
 import '/pages/users/user/my_task.dart';

 import '/pages/talk/talk_info.dart';
 import '/pages/talk/publish.dart';
 import '/pages/talk/detail.dart';
 import '/pages/talk/notice.dart';
 import '/pages/talk/task_detail.dart';
 import '/pages/talk/submit_task.dart';
 import '/pages/talk/publish_task.dart';
 import '/pages/talk/task_list.dart';
 import '/pages/talk/release_details.dart';
 import '/pages/talk/review_detail.dart';


 import '/pages/web_tabs/details/detail.dart';
 import '/pages/web_tabs/details/settlement.dart';
 import '/pages/web_tabs/details/pay_success.dart';
 import '/pages/web_tabs/details/draw_lots.dart';
 import '/pages/web_tabs/announcement/index.dart';
 import '/pages/web_tabs/announcement/detail.dart';

 import '/pages/web_tabs/lottery/lottery_draw.dart';
 import '/pages/web_tabs/lottery/lottery_list.dart';
 import '/pages/web_tabs/lottery/rule.dart';
 
 import '/pages/web_tabs/activity/synthesis.dart';
 import '/pages/web_tabs/activity/detail.dart';

 import '/pages/web_tabs/activity/replacement_detail.dart';
 import '/pages/web_tabs/activity/decomposition_detail.dart';
 import '/pages/web_tabs/ranking/ranking_list.dart';
 import '/pages/web_tabs/ranking/rule.dart';
 import '/pages/web_tabs/ranking/settings.dart';

  import '/pages/web_tabs/market/market_detail.dart';
   import '/pages/web_tabs/market/market_list.dart';
     import '/pages/web_tabs/market/transaction_record.dart';
     import '/pages/web_tabs/market/entrust_success.dart';

  import '/pages/web_tabs/pledge/my_pledge.dart';
  import '/pages/web_tabs/pledge/pledge_detail.dart';


  import '/pages/web_tabs/order/consignment_detail.dart';
  import '/pages/web_tabs/order/entrust.dart';
  import '/pages/web_tabs/order/order_list.dart';
  import '/pages/web_tabs/order/purchase_details.dart';
  import '/pages/web_tabs/order/pending_payment.dart';
  import '/pages/web_tabs/order/trade_success.dart';


  import '/pages/web_tabs/shopping/mall_amount.dart';
  import '/pages/web_tabs/shopping/mall_detail.dart';
  import '/pages/web_tabs/shopping/mall_exchange.dart';
  import '/pages/web_tabs/shopping/mall_integral.dart';
  import '/pages/web_tabs/shopping/mall_pay.dart';
  import '/pages/web_tabs/shopping/mall_address.dart';
  import '/pages/web_tabs/shopping/mall_wallet.dart';
  import '/pages/web_tabs/shopping/mall.dart';
  import '/pages/web_tabs/shopping/mall_up_addrerss.dart';
  import '/pages/web_tabs/resale/detail.dart';
  import '/pages/web_tabs/resale/resale.dart';
  import '/pages/web_tabs/resale/open_box.dart';

  import '/pages/web_tabs/resale/sale.dart';


  import '/pages/login/get_password.dart';
  import '/pages/login/login_type.dart';
  import '/pages/login/splash_screen.dart';
  import '/pages/login/register.dart';
  import '/pages/login/register_tow.dart';


  import '/pages/webview.dart';
  import '/pages/web_webview.dart';
  import '/pages/agreement.dart';
  import '/pages/img.dart';




  import '/middleware/middleware.dart';

import '../bindding/web3.dart';

class AppPage {
  static final routes = [

    
      GetPage(name: "/pages/myapp", page: () =>  MyApp()),

    GetPage(name: "/chat/add", page: () =>  AddChat()),
       GetPage(name: "/chat/msg", page: () =>  ChatMsg()),
    
    // GetPage(name: "/chat/book", page: () =>  ChatPage()),
 

    GetPage(name: "/webview", page: () =>  WebViewWithReturn()),
    GetPage(name: "/web_webview", page: () =>  WebViewPage()),


    
    GetPage(name: "/agreement", page: () =>  Agreement()),

     GetPage(name: "/web_tabs/resale/sale", page: () =>  Sale()),

    GetPage(name: "/web_tabs/resale/open_box", page: () =>  OpenBox()),
    GetPage(name: "/web_tabs/resale/resale", page: () =>  Resale()),
    GetPage(name: "/web_tabs/resale/detail", page: () =>  resaleDateil()),

     GetPage(name: "/login/get_password", page: () =>  GetPassword()),
     GetPage(name: "/login/login_type", page: () =>  LoginType()),

     GetPage(name: "/login/splash_screen", page: () =>  SplashScreen()),

     GetPage(name: "/login/register_tow", page: () =>  LoginTypeTow()),
     GetPage(name: "/login/register", page: () =>  Register()),

  
     GetPage(name: "/",binding:
          WebControllerBinding()      
      , page: () =>  Tabs(),middlewares: [
        AllMiddleware()
      ]),


     GetPage(name: "/web_tabs/shopping/mall_up_addrerss", page: () =>  MallUpAddrerss()),
     GetPage(name: "/web_tabs/shopping/mall_amount", page: () =>  MallAmount()),
     GetPage(name: "/web_tabs/shopping/mall_detail", page: () =>  MallDetail()),
     GetPage(name: "/web_tabs/shopping/mall_exchange", page: () =>  MallExchange()),
     GetPage(name: "/web_tabs/shopping/mall_integral", page: () =>  MallIntegral()),
     GetPage(name: "/web_tabs/shopping/mall_pay", page: () =>  MallPay()),
     GetPage(name: "/web_tabs/shopping/mall_wallet", page: () =>  MallWallet()),
     GetPage(name: "/web_tabs/shopping/mall_address", page: () =>  MallAddress()),
     GetPage(name: "/web_tabs/shopping/mall", page: () =>  Mall()),


     GetPage(name: "/web_tabs/order/consignment_detail", page: () =>  ConsignmentDetail()),
     GetPage(name: "/web_tabs/order/entrust", page: () =>  Entrust()),
     GetPage(name: "/web_tabs/order/order_list", page: () =>  OrderList()),
     GetPage(name: "/web_tabs/order/purchase_details", page: () =>  PurchaseDetails()),
     GetPage(name: "/web_tabs/order/pending_payment", page: () =>  PendingPayment()),
     GetPage(name: "/web_tabs/order/trade_success", page: () =>  TradeSuccess()),


     GetPage(name: "/web_tabs/pledge/my_pledge", page: () =>  MyPledge()),
      GetPage(name: "/web_tabs/pledge/pledge_detail", page: () =>  PledgeDetail()),
    GetPage(name: "/web_tabs/market/entrust_success", page: () =>  EntrustSuccess()),
    GetPage(name: "/web_tabs/market/market_detail", page: () =>  MarketDetail()),
    GetPage(name: "/web_tabs/market/market_list", page: () =>  MarketList()),
    GetPage(name: "/web_tabs/market/transaction_record", page: () =>  TransactionRecord()),
      GetPage(name: "/web_tabs/ranking/settings", page: () =>  RankingSettings()),
      GetPage(name: "/web_tabs/ranking/rule", page: () =>  RankingRule()),
      GetPage(name: "/web_tabs/ranking/ranking_list", page: () =>  RankingList()),
      GetPage(name: "/web_tabs/activity/decomposition_detail", page: () =>  DecompositionDateil()),
      GetPage(name: "/web_tabs/activity/replacement_detail", page: () =>  ReplacementDateil()),
      GetPage(name: "/web_tabs/activity/synthesis", page: () =>  Synthesis()),
      GetPage(name: "/web_tabs/activity/detail", page: () =>  ActivityDetail()),
      GetPage(name: "/web_tabs/lottery/lottery_draw", page: () =>  LotteryDraw()),
      GetPage(name: "/web_tabs/lottery/lottery_list", page: () =>  LotteryList()),
      GetPage(name: "/web_tabs/lottery/rule", page: () =>  Rule()),


      GetPage(name: "/web_tabs/details/detail", page: () =>  WebDetail()),
      GetPage(name: "/web_tabs/details/settlement", page: () =>  Settlement()),
      GetPage(name: "/web_tabs/details/pay_success", page: () =>  PaySuccess()),
      GetPage(name: "/web_tabs/announcement/index", page: () =>  Announcement()),
      GetPage(name: "/web_tabs/announcement/detail", page: () =>  AnnouncementDetail()),
      GetPage(name: "/web_tabs/details/draw_lots", page: () =>  DrawLots()),

      
      
      GetPage(name: "/rate", page: () =>  Rate()),
      GetPage(name: "/certification", page: () =>  Certification()),
      GetPage(name: "/setting", page: () =>  Setting()),
      GetPage(name: "/follow", page: () =>  Follow()),
      GetPage(name: "/change_password", page: () =>  ChangePassword()),
      GetPage(name: "/help", page: () =>  Help()),
      GetPage(name: "/solution", page: () =>  Solution()),
      GetPage(name: "/invitation", page: () =>  Invitation()),
      GetPage(name: "/poster", page: () =>  Poster()),
      GetPage(name: "/osg_authentication", page: () =>  OsgAuthentication()),
      GetPage(name: "/identification", page: () =>  Identification()),
      GetPage(name: "/examine", page: () =>  ExaminePage()),
      GetPage(name: "/live_seeting", page: () =>  LiveSeeting()),
      GetPage(name: "/enterprise_certification", page: () =>  EnterpriseCertification()),

      GetPage(name: "/users/user/index",binding:
          WebControllerBinding()      
      , page: () =>  UserHome()),
      GetPage(name: "/users/user/edit_info", page: () =>  EditInfo()),
      GetPage(name: "/users/user/add_module", page: () =>  AddModule()),
      GetPage(name: "/users/user/all_collection", page: () =>  AllCollection()),
      GetPage(name: "/users/user/my_task", page: () =>  MyTask()),


      GetPage(name: "/talk/talk_info", page: () =>  TalkInfo()),
      GetPage(name: "/talk/publish", page: () =>  Publish()),
      GetPage(name: "/talk/deatil", page: () =>  Deatil()),
      GetPage(name: "/talk/notice", page: () =>  Notice()),
      GetPage(name: "/talk/task_detail", page: () =>  TaskDetail()),
      GetPage(name: "/talk/submit_task", page: () =>  SubmitTask()),
      GetPage(name: "/talk/publish_task", page: () =>  PublishTask()),
      GetPage(name: "/talk/task_list", page: () =>  TaskList()),
      GetPage(name: "/talk/release_details", page: () =>  ReleaseDetails()),
      GetPage(name: "/talk/review_detail", page: () =>  ReviewDetail()),


    ];
  
}


// import 'package:flutter/cupertino.dart';
// import '../pages/tabs.dart';
// import '../pages/hero.dart';

// final Map<String,Function> routes = {
//   '/': (contxt) => const Tabs(), 
//   '/hero': (contxt,{arguments}) => HeroPage(arguments:arguments), 
// };

// var onGenerateRoute = (RouteSettings settings) {
//   // 统一处理
//   final String? name = settings.name;
//   final Function? pageContentBuilder = routes[name];
//   if (pageContentBuilder != null) {
//     if (settings.arguments != null) {
//       final Route route = CupertinoPageRoute(
//           builder: (context) =>
//               pageContentBuilder(context, arguments: settings.arguments));
//       return route;
//     } else {
//       final Route route =
//           CupertinoPageRoute(builder: (context) => pageContentBuilder(context));
//       return route;
//     }
//   }
//   return null;
// };
